{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "ccbd3293",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pathlib import Path"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "53c78d79",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "PosixPath('/media/DataExt4/Software/Others/OpenStudio/src/model')"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ROOT_DIR = Path(\"../../\").resolve()\n",
    "MODEL_DIR = ROOT_DIR / \"src/model\"\n",
    "MODEL_DIR"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e0bb2abe",
   "metadata": {},
   "source": [
    "# Parse Swig .i files to get information about classes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "id": "0efd6023",
   "metadata": {},
   "outputs": [],
   "source": [
    "class SwigEntry:\n",
    "    def __init__(self, name, is_unique, swig_file):\n",
    "        self.name = name\n",
    "        self.is_unique = is_unique\n",
    "        self.swig_file = swig_file\n",
    "\n",
    "    def __repr__(self):\n",
    "        s = \"\"\n",
    "        if self.is_unique:\n",
    "            s = \", Unique\"\n",
    "        return f\"{self.name}({self.swig_file}{s})\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "id": "7c59f0e7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelAvailabilityManager.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelResources.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelGenerators.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelSimulation.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelGeometry.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelAirflow.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelPlantEquipmentOperationScheme.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelStraightComponent.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelRefrigeration.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelZoneHVAC.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelCore.i\n",
      "/media/DataExt4/Software/Others/OpenStudio/src/model/ModelHVAC.i\n"
     ]
    }
   ],
   "source": [
    "swig_entries = []\n",
    "for swig_file in MODEL_DIR.glob(\"*.i\"):\n",
    "    swig_file_name = swig_file.name\n",
    "    if swig_file_name in [\"Model_Common_Include.i\", \"Model.i\"]:\n",
    "        continue\n",
    "    print(swig_file)\n",
    "    with open(swig_file, \"r\") as f:\n",
    "        content = f.read()\n",
    "    lines = content.splitlines()\n",
    "    for line in lines:\n",
    "        line = line.split(\"//\")[0].strip()\n",
    "        if \"UNIQUEMODELOBJECT_TEMPLATES\" in line:\n",
    "            name = line.split(\"(\")[1].split(\")\")[0].strip()\n",
    "            swig_entries.append(SwigEntry(name=name, is_unique=True, swig_file=swig_file_name))\n",
    "        elif \"MODELOBJECT_TEMPLATES\" in line:\n",
    "            name = line.split(\"(\")[1].split(\")\")[0].strip()\n",
    "            swig_entries.append(SwigEntry(name=name, is_unique=False, swig_file=swig_file_name))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "1f02ec5e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[AdditionalProperties(ModelCore.i),\n",
       " AirConditionerVariableRefrigerantFlow(ModelStraightComponent.i),\n",
       " AirGap(ModelResources.i),\n",
       " AirLoopHVAC(ModelHVAC.i),\n",
       " AirLoopHVACDedicatedOutdoorAirSystem(ModelHVAC.i),\n",
       " AirLoopHVACOutdoorAirSystem(ModelHVAC.i),\n",
       " AirLoopHVACReturnPlenum(ModelHVAC.i),\n",
       " AirLoopHVACSupplyPlenum(ModelHVAC.i),\n",
       " AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass(ModelStraightComponent.i),\n",
       " AirLoopHVACUnitaryHeatPumpAirToAir(ModelStraightComponent.i),\n",
       " AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed(ModelStraightComponent.i),\n",
       " AirLoopHVACUnitarySystem(ModelZoneHVAC.i),\n",
       " AirLoopHVACZoneMixer(ModelHVAC.i),\n",
       " AirLoopHVACZoneSplitter(ModelHVAC.i),\n",
       " AirSupplyConstituent(ModelGenerators.i),\n",
       " AirTerminalDualDuctConstantVolume(ModelHVAC.i),\n",
       " AirTerminalDualDuctVAV(ModelHVAC.i),\n",
       " AirTerminalDualDuctVAVOutdoorAir(ModelHVAC.i),\n",
       " AirTerminalSingleDuctConstantVolumeCooledBeam(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctConstantVolumeFourPipeBeam(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctConstantVolumeFourPipeInduction(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctConstantVolumeNoReheat(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctConstantVolumeReheat(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctInletSideMixer(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctParallelPIUReheat(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctSeriesPIUReheat(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctVAVHeatAndCoolNoReheat(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctVAVHeatAndCoolReheat(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctVAVNoReheat(ModelStraightComponent.i),\n",
       " AirTerminalSingleDuctVAVReheat(ModelStraightComponent.i),\n",
       " AirToAirComponent(ModelHVAC.i),\n",
       " AirWallMaterial(ModelResources.i),\n",
       " AirflowNetworkComponent(ModelAirflow.i),\n",
       " AirflowNetworkConstantPressureDrop(ModelAirflow.i),\n",
       " AirflowNetworkCrack(ModelAirflow.i),\n",
       " AirflowNetworkDetailedOpening(ModelAirflow.i),\n",
       " AirflowNetworkDistributionLinkage(ModelAirflow.i),\n",
       " AirflowNetworkDistributionNode(ModelAirflow.i),\n",
       " AirflowNetworkDuct(ModelAirflow.i),\n",
       " AirflowNetworkDuctViewFactors(ModelAirflow.i),\n",
       " AirflowNetworkEffectiveLeakageArea(ModelAirflow.i),\n",
       " AirflowNetworkEquivalentDuct(ModelAirflow.i),\n",
       " AirflowNetworkExternalNode(ModelAirflow.i),\n",
       " AirflowNetworkFan(ModelAirflow.i),\n",
       " AirflowNetworkHorizontalOpening(ModelAirflow.i),\n",
       " AirflowNetworkLeakageRatio(ModelAirflow.i),\n",
       " AirflowNetworkLinkage(ModelAirflow.i),\n",
       " AirflowNetworkNode(ModelAirflow.i),\n",
       " AirflowNetworkOccupantVentilationControl(ModelAirflow.i),\n",
       " AirflowNetworkOutdoorAirflow(ModelAirflow.i),\n",
       " AirflowNetworkReferenceCrackConditions(ModelAirflow.i),\n",
       " AirflowNetworkSimpleOpening(ModelAirflow.i),\n",
       " AirflowNetworkSimulationControl(ModelAirflow.i, Unique),\n",
       " AirflowNetworkSpecifiedFlowRate(ModelAirflow.i),\n",
       " AirflowNetworkSurface(ModelAirflow.i),\n",
       " AirflowNetworkZone(ModelAirflow.i),\n",
       " AirflowNetworkZoneExhaustFan(ModelAirflow.i),\n",
       " AvailabilityManager(ModelHVAC.i),\n",
       " AvailabilityManagerAssignmentList(ModelHVAC.i),\n",
       " AvailabilityManagerDifferentialThermostat(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerHighTemperatureTurnOff(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerHighTemperatureTurnOn(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerHybridVentilation(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerLowTemperatureTurnOff(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerLowTemperatureTurnOn(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerNightCycle(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerNightVentilation(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerOptimumStart(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerScheduled(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerScheduledOff(ModelAvailabilityManager.i),\n",
       " AvailabilityManagerScheduledOn(ModelAvailabilityManager.i),\n",
       " Blind(ModelResources.i),\n",
       " BoilerHotWater(ModelStraightComponent.i),\n",
       " BoilerSteam(ModelStraightComponent.i),\n",
       " Building(ModelGeometry.i, Unique),\n",
       " BuildingStory(ModelGeometry.i),\n",
       " BuildingUnit(ModelGeometry.i),\n",
       " CFactorUndergroundWallConstruction(ModelResources.i),\n",
       " CentralHeatPumpSystem(ModelHVAC.i),\n",
       " CentralHeatPumpSystemModule(ModelHVAC.i),\n",
       " ChillerAbsorption(ModelHVAC.i),\n",
       " ChillerAbsorptionIndirect(ModelHVAC.i),\n",
       " ChillerElectricEIR(ModelHVAC.i),\n",
       " ChillerElectricReformulatedEIR(ModelHVAC.i),\n",
       " ChillerHeaterPerformanceElectricEIR(ModelHVAC.i),\n",
       " ClimateZones(ModelSimulation.i, Unique),\n",
       " CoilCoolingCooledBeam(ModelStraightComponent.i),\n",
       " CoilCoolingDX(ModelStraightComponent.i),\n",
       " CoilCoolingDXCurveFitOperatingMode(ModelResources.i),\n",
       " CoilCoolingDXCurveFitPerformance(ModelResources.i),\n",
       " CoilCoolingDXCurveFitSpeed(ModelResources.i),\n",
       " CoilCoolingDXMultiSpeed(ModelStraightComponent.i),\n",
       " CoilCoolingDXMultiSpeedStageData(ModelHVAC.i),\n",
       " CoilCoolingDXSingleSpeed(ModelStraightComponent.i),\n",
       " CoilCoolingDXTwoSpeed(ModelStraightComponent.i),\n",
       " CoilCoolingDXTwoStageWithHumidityControlMode(ModelStraightComponent.i),\n",
       " CoilCoolingDXVariableRefrigerantFlow(ModelHVAC.i),\n",
       " CoilCoolingDXVariableSpeed(ModelStraightComponent.i),\n",
       " CoilCoolingDXVariableSpeedSpeedData(ModelHVAC.i),\n",
       " CoilCoolingFourPipeBeam(ModelStraightComponent.i),\n",
       " CoilCoolingLowTempRadiantConstFlow(ModelStraightComponent.i),\n",
       " CoilCoolingLowTempRadiantVarFlow(ModelStraightComponent.i),\n",
       " CoilCoolingWater(ModelHVAC.i),\n",
       " CoilCoolingWaterPanelRadiant(ModelStraightComponent.i),\n",
       " CoilCoolingWaterToAirHeatPumpEquationFit(ModelHVAC.i),\n",
       " CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit(ModelHVAC.i),\n",
       " CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData(ModelHVAC.i),\n",
       " CoilHeatingDXMultiSpeed(ModelStraightComponent.i),\n",
       " CoilHeatingDXMultiSpeedStageData(ModelHVAC.i),\n",
       " CoilHeatingDXSingleSpeed(ModelStraightComponent.i),\n",
       " CoilHeatingDXVariableRefrigerantFlow(ModelHVAC.i),\n",
       " CoilHeatingDXVariableSpeed(ModelStraightComponent.i),\n",
       " CoilHeatingDXVariableSpeedSpeedData(ModelHVAC.i),\n",
       " CoilHeatingDesuperheater(ModelStraightComponent.i),\n",
       " CoilHeatingElectric(ModelStraightComponent.i),\n",
       " CoilHeatingFourPipeBeam(ModelStraightComponent.i),\n",
       " CoilHeatingGas(ModelStraightComponent.i),\n",
       " CoilHeatingGasMultiStage(ModelStraightComponent.i),\n",
       " CoilHeatingGasMultiStageStageData(ModelHVAC.i),\n",
       " CoilHeatingLowTempRadiantConstFlow(ModelStraightComponent.i),\n",
       " CoilHeatingLowTempRadiantVarFlow(ModelStraightComponent.i),\n",
       " CoilHeatingWater(ModelHVAC.i),\n",
       " CoilHeatingWaterBaseboard(ModelStraightComponent.i),\n",
       " CoilHeatingWaterBaseboardRadiant(ModelStraightComponent.i),\n",
       " CoilHeatingWaterToAirHeatPumpEquationFit(ModelHVAC.i),\n",
       " CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit(ModelHVAC.i),\n",
       " CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData(ModelHVAC.i),\n",
       " CoilPerformanceDXCooling(ModelHVAC.i),\n",
       " CoilSystemCoolingDXHeatExchangerAssisted(ModelStraightComponent.i),\n",
       " CoilSystemCoolingWaterHeatExchangerAssisted(ModelStraightComponent.i),\n",
       " CoilSystemIntegratedHeatPumpAirSource(ModelStraightComponent.i),\n",
       " CoilWaterHeatingAirToWaterHeatPump(ModelHVAC.i),\n",
       " CoilWaterHeatingAirToWaterHeatPumpVariableSpeed(ModelHVAC.i),\n",
       " CoilWaterHeatingAirToWaterHeatPumpVariableSpeedSpeedData(ModelHVAC.i),\n",
       " CoilWaterHeatingAirToWaterHeatPumpWrapped(ModelHVAC.i),\n",
       " CoilWaterHeatingDesuperheater(ModelStraightComponent.i),\n",
       " ComponentData(ModelCore.i),\n",
       " ConnectorMixer(ModelHVAC.i),\n",
       " ConnectorSplitter(ModelHVAC.i),\n",
       " Construction(ModelResources.i),\n",
       " ConstructionAirBoundary(ModelResources.i),\n",
       " ConstructionBase(ModelResources.i),\n",
       " ConstructionWithInternalSource(ModelResources.i),\n",
       " ControllerMechanicalVentilation(ModelHVAC.i),\n",
       " ControllerOutdoorAir(ModelHVAC.i),\n",
       " ControllerWaterCoil(ModelHVAC.i),\n",
       " ConvergenceLimits(ModelSimulation.i, Unique),\n",
       " CoolingTowerPerformanceCoolTools(ModelHVAC.i),\n",
       " CoolingTowerPerformanceYorkCalc(ModelHVAC.i),\n",
       " CoolingTowerSingleSpeed(ModelStraightComponent.i),\n",
       " CoolingTowerTwoSpeed(ModelStraightComponent.i),\n",
       " CoolingTowerVariableSpeed(ModelStraightComponent.i),\n",
       " Curve(ModelResources.i),\n",
       " CurveBicubic(ModelResources.i),\n",
       " CurveBiquadratic(ModelResources.i),\n",
       " CurveCubic(ModelResources.i),\n",
       " CurveDoubleExponentialDecay(ModelResources.i),\n",
       " CurveExponent(ModelResources.i),\n",
       " CurveExponentialDecay(ModelResources.i),\n",
       " CurveExponentialSkewNormal(ModelResources.i),\n",
       " CurveFanPressureRise(ModelResources.i),\n",
       " CurveFunctionalPressureDrop(ModelResources.i),\n",
       " CurveLinear(ModelResources.i),\n",
       " CurveQuadLinear(ModelResources.i),\n",
       " CurveQuadratic(ModelResources.i),\n",
       " CurveQuadraticLinear(ModelResources.i),\n",
       " CurveQuartic(ModelResources.i),\n",
       " CurveQuintLinear(ModelResources.i),\n",
       " CurveRectangularHyperbola1(ModelResources.i),\n",
       " CurveRectangularHyperbola2(ModelResources.i),\n",
       " CurveSigmoid(ModelResources.i),\n",
       " CurveTriquadratic(ModelResources.i),\n",
       " CustomBlock(ModelGeometry.i),\n",
       " DaylightRedirectionDevice(ModelResources.i),\n",
       " DaylightingControl(ModelGeometry.i),\n",
       " DaylightingDeviceLightWell(ModelGeometry.i),\n",
       " DaylightingDeviceShelf(ModelGeometry.i),\n",
       " DaylightingDeviceTubular(ModelGeometry.i),\n",
       " DefaultConstructionSet(ModelGeometry.i),\n",
       " DefaultScheduleSet(ModelResources.i),\n",
       " DefaultSubSurfaceConstructions(ModelResources.i),\n",
       " DefaultSurfaceConstructions(ModelResources.i),\n",
       " DesignDay(ModelSimulation.i),\n",
       " DesignSpecificationOutdoorAir(ModelResources.i),\n",
       " DetailedOpeningFactorData(ModelAirflow.i),\n",
       " DistrictCooling(ModelStraightComponent.i),\n",
       " DistrictHeating(ModelStraightComponent.i),\n",
       " Duct(ModelStraightComponent.i),\n",
       " EMSActuatorNames(ModelCore.i),\n",
       " ElectricEquipment(ModelGeometry.i),\n",
       " ElectricEquipmentDefinition(ModelResources.i),\n",
       " ElectricEquipmentITEAirCooled(ModelGeometry.i),\n",
       " ElectricEquipmentITEAirCooledDefinition(ModelResources.i),\n",
       " ElectricLoadCenterDistribution(ModelGenerators.i),\n",
       " ElectricLoadCenterInverterLookUpTable(ModelGenerators.i),\n",
       " ElectricLoadCenterInverterPVWatts(ModelGenerators.i),\n",
       " ElectricLoadCenterInverterSimple(ModelGenerators.i),\n",
       " ElectricLoadCenterStorageConverter(ModelGenerators.i),\n",
       " ElectricLoadCenterStorageLiIonNMCBattery(ModelGenerators.i),\n",
       " ElectricLoadCenterStorageSimple(ModelGenerators.i),\n",
       " ElectricLoadCenterTransformer(ModelGenerators.i),\n",
       " ElectricalStorage(ModelGenerators.i),\n",
       " EnergyManagementSystemActuator(ModelCore.i),\n",
       " EnergyManagementSystemConstructionIndexVariable(ModelCore.i),\n",
       " EnergyManagementSystemCurveOrTableIndexVariable(ModelCore.i),\n",
       " EnergyManagementSystemGlobalVariable(ModelCore.i),\n",
       " EnergyManagementSystemInternalVariable(ModelCore.i),\n",
       " EnergyManagementSystemMeteredOutputVariable(ModelCore.i),\n",
       " EnergyManagementSystemOutputVariable(ModelCore.i),\n",
       " EnergyManagementSystemProgram(ModelCore.i),\n",
       " EnergyManagementSystemProgramCallingManager(ModelCore.i),\n",
       " EnergyManagementSystemSensor(ModelCore.i),\n",
       " EnergyManagementSystemSubroutine(ModelCore.i),\n",
       " EnergyManagementSystemTrendVariable(ModelCore.i),\n",
       " EnvironmentalImpactFactors(ModelSimulation.i, Unique),\n",
       " EvaporativeCoolerDirectResearchSpecial(ModelStraightComponent.i),\n",
       " EvaporativeCoolerIndirectResearchSpecial(ModelStraightComponent.i),\n",
       " EvaporativeFluidCoolerSingleSpeed(ModelStraightComponent.i),\n",
       " EvaporativeFluidCoolerTwoSpeed(ModelStraightComponent.i),\n",
       " ExteriorFuelEquipment(ModelGeometry.i),\n",
       " ExteriorFuelEquipmentDefinition(ModelResources.i),\n",
       " ExteriorLights(ModelGeometry.i),\n",
       " ExteriorLightsDefinition(ModelResources.i),\n",
       " ExteriorLoadDefinition(ModelResources.i),\n",
       " ExteriorLoadInstance(ModelGeometry.i),\n",
       " ExteriorWaterEquipment(ModelGeometry.i),\n",
       " ExteriorWaterEquipmentDefinition(ModelResources.i),\n",
       " ExternalFile(ModelResources.i),\n",
       " ExternalInterface(ModelCore.i, Unique),\n",
       " ExternalInterfaceActuator(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitExportFromVariable(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitExportToActuator(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitExportToSchedule(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitExportToVariable(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitImport(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitImportFromVariable(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitImportToActuator(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitImportToSchedule(ModelCore.i),\n",
       " ExternalInterfaceFunctionalMockupUnitImportToVariable(ModelCore.i),\n",
       " ExternalInterfaceSchedule(ModelCore.i),\n",
       " ExternalInterfaceVariable(ModelCore.i),\n",
       " FFactorGroundFloorConstruction(ModelResources.i),\n",
       " Facility(ModelGeometry.i, Unique),\n",
       " FanComponentModel(ModelStraightComponent.i),\n",
       " FanConstantVolume(ModelStraightComponent.i),\n",
       " FanOnOff(ModelStraightComponent.i),\n",
       " FanSystemModel(ModelStraightComponent.i),\n",
       " FanSystemModelSpeed(ModelStraightComponent.i),\n",
       " FanVariableVolume(ModelStraightComponent.i),\n",
       " FanZoneExhaust(ModelZoneHVAC.i),\n",
       " FenestrationMaterial(ModelResources.i),\n",
       " FluidCoolerSingleSpeed(ModelStraightComponent.i),\n",
       " FluidCoolerTwoSpeed(ModelStraightComponent.i),\n",
       " FoundationKiva(ModelGeometry.i),\n",
       " FoundationKivaSettings(ModelSimulation.i, Unique),\n",
       " FuelFactors(ModelSimulation.i),\n",
       " FuelSupplyConstituent(ModelGenerators.i),\n",
       " Gas(ModelResources.i),\n",
       " GasEquipment(ModelGeometry.i),\n",
       " GasEquipmentDefinition(ModelResources.i),\n",
       " GasLayer(ModelResources.i),\n",
       " GasMixture(ModelResources.i),\n",
       " Generator(ModelGenerators.i),\n",
       " GeneratorFuelCell(ModelGenerators.i),\n",
       " GeneratorFuelCellAirSupply(ModelGenerators.i),\n",
       " GeneratorFuelCellAuxiliaryHeater(ModelGenerators.i),\n",
       " GeneratorFuelCellElectricalStorage(ModelGenerators.i),\n",
       " GeneratorFuelCellExhaustGasToWaterHeatExchanger(ModelGenerators.i),\n",
       " GeneratorFuelCellInverter(ModelGenerators.i),\n",
       " GeneratorFuelCellPowerModule(ModelGenerators.i),\n",
       " GeneratorFuelCellStackCooler(ModelGenerators.i),\n",
       " GeneratorFuelCellWaterSupply(ModelGenerators.i),\n",
       " GeneratorFuelSupply(ModelGenerators.i),\n",
       " GeneratorMicroTurbine(ModelGenerators.i),\n",
       " GeneratorMicroTurbineHeatRecovery(ModelGenerators.i),\n",
       " GeneratorPVWatts(ModelGenerators.i),\n",
       " GeneratorPhotovoltaic(ModelGenerators.i),\n",
       " GeneratorWindTurbine(ModelGenerators.i),\n",
       " GenericModelObject(ModelCore.i),\n",
       " GlareSensor(ModelGeometry.i),\n",
       " Glazing(ModelResources.i),\n",
       " GroundHeatExchangerHorizontalTrench(ModelStraightComponent.i),\n",
       " GroundHeatExchangerVertical(ModelStraightComponent.i),\n",
       " HVACComponent(ModelHVAC.i),\n",
       " HeaderedPumpsConstantSpeed(ModelStraightComponent.i),\n",
       " HeaderedPumpsVariableSpeed(ModelStraightComponent.i),\n",
       " HeatBalanceAlgorithm(ModelSimulation.i, Unique),\n",
       " HeatExchangerAirToAirSensibleAndLatent(ModelHVAC.i),\n",
       " HeatExchangerDesiccantBalancedFlow(ModelHVAC.i),\n",
       " HeatExchangerDesiccantBalancedFlowPerformanceDataType1(ModelResources.i),\n",
       " HeatExchangerFluidToFluid(ModelHVAC.i),\n",
       " HeatPumpPlantLoopEIRCooling(ModelHVAC.i),\n",
       " HeatPumpPlantLoopEIRHeating(ModelHVAC.i),\n",
       " HeatPumpWaterToWaterEquationFitCooling(ModelHVAC.i),\n",
       " HeatPumpWaterToWaterEquationFitHeating(ModelHVAC.i),\n",
       " HotWaterEquipment(ModelGeometry.i),\n",
       " HotWaterEquipmentDefinition(ModelResources.i),\n",
       " HumidifierSteamElectric(ModelStraightComponent.i),\n",
       " HumidifierSteamGas(ModelStraightComponent.i),\n",
       " IlluminanceMap(ModelGeometry.i),\n",
       " InfraredTransparentMaterial(ModelResources.i),\n",
       " InsideSurfaceConvectionAlgorithm(ModelSimulation.i, Unique),\n",
       " InteriorPartitionSurface(ModelGeometry.i),\n",
       " InteriorPartitionSurfaceGroup(ModelGeometry.i),\n",
       " InternalMass(ModelGeometry.i),\n",
       " InternalMassDefinition(ModelResources.i),\n",
       " Inverter(ModelGenerators.i),\n",
       " LayeredConstruction(ModelResources.i),\n",
       " LifeCycleCost(ModelCore.i),\n",
       " LifeCycleCostParameters(ModelCore.i, Unique),\n",
       " LightingDesignDay(ModelSimulation.i),\n",
       " LightingSimulationControl(ModelSimulation.i, Unique),\n",
       " LightingSimulationZone(ModelGeometry.i),\n",
       " Lights(ModelGeometry.i),\n",
       " LightsDefinition(ModelResources.i),\n",
       " LoadProfilePlant(ModelStraightComponent.i),\n",
       " Loop(ModelHVAC.i),\n",
       " Luminaire(ModelGeometry.i),\n",
       " LuminaireDefinition(ModelResources.i),\n",
       " MasslessOpaqueMaterial(ModelResources.i),\n",
       " Material(ModelResources.i),\n",
       " MaterialPropertyGlazingSpectralData(ModelResources.i),\n",
       " MaterialPropertyMoisturePenetrationDepthSettings(ModelResources.i),\n",
       " MeterCustom(ModelCore.i),\n",
       " MeterCustomDecrement(ModelCore.i),\n",
       " Mixer(ModelHVAC.i),\n",
       " ModelObjectList(ModelCore.i),\n",
       " ModelPartitionMaterial(ModelResources.i),\n",
       " Node(ModelHVAC.i),\n",
       " OpaqueMaterial(ModelResources.i),\n",
       " OtherEquipment(ModelGeometry.i),\n",
       " OtherEquipmentDefinition(ModelResources.i),\n",
       " OutputControlFiles(ModelSimulation.i, Unique),\n",
       " OutputControlReportingTolerances(ModelSimulation.i, Unique),\n",
       " OutputDebuggingData(ModelSimulation.i, Unique),\n",
       " OutputDiagnostics(ModelSimulation.i, Unique),\n",
       " OutputEnergyManagementSystem(ModelCore.i, Unique),\n",
       " OutputEnvironmentalImpactFactors(ModelSimulation.i),\n",
       " OutputJSON(ModelSimulation.i, Unique),\n",
       " OutputMeter(ModelCore.i),\n",
       " OutputTableSummaryReports(ModelSimulation.i, Unique),\n",
       " OutputVariable(ModelCore.i),\n",
       " OutsideSurfaceConvectionAlgorithm(ModelSimulation.i, Unique),\n",
       " ParentObject(ModelCore.i),\n",
       " People(ModelGeometry.i),\n",
       " PeopleDefinition(ModelResources.i),\n",
       " PerformancePrecisionTradeoffs(ModelSimulation.i, Unique),\n",
       " PhotovoltaicPerformance(ModelGenerators.i),\n",
       " PhotovoltaicPerformanceEquivalentOneDiode(ModelGenerators.i),\n",
       " PhotovoltaicPerformanceSandia(ModelGenerators.i),\n",
       " PhotovoltaicPerformanceSimple(ModelGenerators.i),\n",
       " PipeAdiabatic(ModelStraightComponent.i),\n",
       " PipeIndoor(ModelStraightComponent.i),\n",
       " PipeOutdoor(ModelStraightComponent.i),\n",
       " PlanarSurface(ModelGeometry.i),\n",
       " PlanarSurfaceGroup(ModelGeometry.i),\n",
       " PlantComponentTemperatureSource(ModelStraightComponent.i),\n",
       " PlantComponentUserDefined(ModelHVAC.i),\n",
       " PlantEquipmentOperationCoolingLoad(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationHeatingLoad(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationOutdoorDewpoint(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationOutdoorDewpointDifference(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationOutdoorDryBulb(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationOutdoorDryBulbDifference(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationOutdoorRelativeHumidity(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationOutdoorWetBulb(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationOutdoorWetBulbDifference(ModelPlantEquipmentOperationScheme.i),\n",
       " PlantEquipmentOperationRangeBasedScheme(ModelHVAC.i),\n",
       " PlantEquipmentOperationScheme(ModelHVAC.i),\n",
       " PlantLoop(ModelHVAC.i),\n",
       " PortList(ModelHVAC.i),\n",
       " PumpConstantSpeed(ModelStraightComponent.i),\n",
       " PumpVariableSpeed(ModelStraightComponent.i),\n",
       " RadianceParameters(ModelCore.i, Unique),\n",
       " RefractionExtinctionGlazing(ModelResources.i),\n",
       " RefrigerationAirChiller(ModelRefrigeration.i),\n",
       " RefrigerationCase(ModelRefrigeration.i),\n",
       " RefrigerationCompressor(ModelRefrigeration.i),\n",
       " RefrigerationCompressorRack(ModelRefrigeration.i),\n",
       " RefrigerationCondenserAirCooled(ModelRefrigeration.i),\n",
       " RefrigerationCondenserCascade(ModelRefrigeration.i),\n",
       " RefrigerationCondenserEvaporativeCooled(ModelRefrigeration.i),\n",
       " RefrigerationCondenserWaterCooled(ModelRefrigeration.i),\n",
       " RefrigerationDefrostCycleParameters(ModelRefrigeration.i),\n",
       " RefrigerationGasCoolerAirCooled(ModelRefrigeration.i),\n",
       " RefrigerationSecondarySystem(ModelRefrigeration.i),\n",
       " RefrigerationSubcoolerLiquidSuction(ModelRefrigeration.i),\n",
       " RefrigerationSubcoolerMechanical(ModelRefrigeration.i),\n",
       " RefrigerationSystem(ModelRefrigeration.i),\n",
       " RefrigerationTranscriticalSystem(ModelRefrigeration.i),\n",
       " RefrigerationWalkIn(ModelRefrigeration.i),\n",
       " RefrigerationWalkInZoneBoundary(ModelRefrigeration.i),\n",
       " RenderingColor(ModelResources.i),\n",
       " ResourceObject(ModelCore.i),\n",
       " RoofVegetation(ModelResources.i),\n",
       " RunPeriod(ModelSimulation.i),\n",
       " RunPeriodControlDaylightSavingTime(ModelSimulation.i, Unique),\n",
       " RunPeriodControlSpecialDays(ModelSimulation.i),\n",
       " Schedule(ModelCore.i),\n",
       " ScheduleBase(ModelCore.i),\n",
       " ScheduleCompact(ModelResources.i),\n",
       " ScheduleConstant(ModelResources.i),\n",
       " ScheduleDay(ModelCore.i),\n",
       " ScheduleFile(ModelResources.i),\n",
       " ScheduleFixedInterval(ModelResources.i),\n",
       " ScheduleInterval(ModelResources.i),\n",
       " ScheduleRule(ModelCore.i),\n",
       " ScheduleRuleset(ModelCore.i),\n",
       " ScheduleType(ModelResources.i),\n",
       " ScheduleTypeKey(ModelCore.i),\n",
       " ScheduleTypeLimits(ModelCore.i),\n",
       " ScheduleVariableInterval(ModelResources.i),\n",
       " ScheduleWeek(ModelCore.i),\n",
       " ScheduleYear(ModelCore.i),\n",
       " Screen(ModelResources.i),\n",
       " SetpointManager(ModelHVAC.i),\n",
       " SetpointManagerColdest(ModelHVAC.i),\n",
       " SetpointManagerFollowGroundTemperature(ModelHVAC.i),\n",
       " SetpointManagerFollowOutdoorAirTemperature(ModelHVAC.i),\n",
       " SetpointManagerFollowSystemNodeTemperature(ModelHVAC.i),\n",
       " SetpointManagerMixedAir(ModelHVAC.i),\n",
       " SetpointManagerMultiZoneCoolingAverage(ModelHVAC.i),\n",
       " SetpointManagerMultiZoneHeatingAverage(ModelHVAC.i),\n",
       " SetpointManagerMultiZoneHumidityMaximum(ModelHVAC.i),\n",
       " SetpointManagerMultiZoneHumidityMinimum(ModelHVAC.i),\n",
       " SetpointManagerMultiZoneMaximumHumidityAverage(ModelHVAC.i),\n",
       " SetpointManagerMultiZoneMinimumHumidityAverage(ModelHVAC.i),\n",
       " SetpointManagerOutdoorAirPretreat(ModelHVAC.i),\n",
       " SetpointManagerOutdoorAirReset(ModelHVAC.i),\n",
       " SetpointManagerScheduled(ModelHVAC.i),\n",
       " SetpointManagerScheduledDualSetpoint(ModelHVAC.i),\n",
       " SetpointManagerSingleZoneCooling(ModelHVAC.i),\n",
       " SetpointManagerSingleZoneHeating(ModelHVAC.i),\n",
       " SetpointManagerSingleZoneHumidityMaximum(ModelHVAC.i),\n",
       " SetpointManagerSingleZoneHumidityMinimum(ModelHVAC.i),\n",
       " SetpointManagerSingleZoneOneStageCooling(ModelHVAC.i),\n",
       " SetpointManagerSingleZoneOneStageHeating(ModelHVAC.i),\n",
       " SetpointManagerSingleZoneReheat(ModelHVAC.i),\n",
       " SetpointManagerWarmest(ModelHVAC.i),\n",
       " SetpointManagerWarmestTemperatureFlow(ModelHVAC.i),\n",
       " Shade(ModelResources.i),\n",
       " ShadingControl(ModelResources.i),\n",
       " ShadingMaterial(ModelResources.i),\n",
       " ShadingSurface(ModelGeometry.i),\n",
       " ShadingSurfaceGroup(ModelGeometry.i),\n",
       " ShadowCalculation(ModelSimulation.i, Unique),\n",
       " SimpleGlazing(ModelResources.i),\n",
       " SimulationControl(ModelSimulation.i, Unique),\n",
       " Site(ModelGeometry.i, Unique),\n",
       " SiteGroundReflectance(ModelSimulation.i, Unique),\n",
       " SiteGroundTemperatureBuildingSurface(ModelSimulation.i, Unique),\n",
       " SiteGroundTemperatureDeep(ModelSimulation.i, Unique),\n",
       " SiteGroundTemperatureFCfactorMethod(ModelSimulation.i, Unique),\n",
       " SiteGroundTemperatureShallow(ModelSimulation.i, Unique),\n",
       " SiteWaterMainsTemperature(ModelSimulation.i, Unique),\n",
       " SizingParameters(ModelSimulation.i, Unique),\n",
       " SizingPeriod(ModelSimulation.i),\n",
       " SizingPlant(ModelHVAC.i),\n",
       " SizingSystem(ModelHVAC.i),\n",
       " SizingZone(ModelHVAC.i),\n",
       " SkyTemperature(ModelSimulation.i),\n",
       " SolarCollectorFlatPlatePhotovoltaicThermal(ModelStraightComponent.i),\n",
       " SolarCollectorFlatPlateWater(ModelStraightComponent.i),\n",
       " SolarCollectorIntegralCollectorStorage(ModelStraightComponent.i),\n",
       " SolarCollectorPerformanceFlatPlate(ModelHVAC.i),\n",
       " SolarCollectorPerformanceIntegralCollectorStorage(ModelHVAC.i),\n",
       " SolarCollectorPerformancePhotovoltaicThermalSimple(ModelHVAC.i),\n",
       " Space(ModelGeometry.i),\n",
       " SpaceInfiltrationDesignFlowRate(ModelGeometry.i),\n",
       " SpaceInfiltrationEffectiveLeakageArea(ModelGeometry.i),\n",
       " SpaceInfiltrationFlowCoefficient(ModelGeometry.i),\n",
       " SpaceItem(ModelGeometry.i),\n",
       " SpaceLoad(ModelGeometry.i),\n",
       " SpaceLoadDefinition(ModelResources.i),\n",
       " SpaceLoadInstance(ModelGeometry.i),\n",
       " SpaceType(ModelGeometry.i),\n",
       " SpectralDataField(ModelResources.i),\n",
       " Splitter(ModelHVAC.i),\n",
       " StandardGlazing(ModelResources.i),\n",
       " StandardOpaqueMaterial(ModelResources.i),\n",
       " StandardsInformationConstruction(ModelResources.i),\n",
       " StandardsInformationMaterial(ModelResources.i),\n",
       " SteamEquipment(ModelGeometry.i),\n",
       " SteamEquipmentDefinition(ModelResources.i),\n",
       " StraightComponent(ModelHVAC.i),\n",
       " SubSurface(ModelGeometry.i),\n",
       " Surface(ModelGeometry.i),\n",
       " SurfaceControlMovableInsulation(ModelGeometry.i),\n",
       " SurfaceIntersection(ModelGeometry.i),\n",
       " SurfacePropertyConvectionCoefficients(ModelGeometry.i),\n",
       " SurfacePropertyConvectionCoefficientsMultipleSurface(ModelSimulation.i),\n",
       " SurfacePropertyExposedFoundationPerimeter(ModelGeometry.i),\n",
       " SurfacePropertyLocalEnvironment(ModelGeometry.i),\n",
       " SurfacePropertyOtherSideCoefficients(ModelGeometry.i),\n",
       " SurfacePropertyOtherSideConditionsModel(ModelGeometry.i),\n",
       " SurfacePropertySurroundingSurfaces(ModelGeometry.i),\n",
       " SurroundingSurfaceGroup(ModelGeometry.i),\n",
       " SwimmingPoolIndoor(ModelHVAC.i),\n",
       " TableMultiVariableLookup(ModelResources.i),\n",
       " TableMultiVariableLookupPoint(ModelResources.i),\n",
       " TemperingValve(ModelStraightComponent.i),\n",
       " ThermalStorageChilledWaterStratified(ModelHVAC.i),\n",
       " ThermalStorageIceDetailed(ModelStraightComponent.i),\n",
       " ThermalZone(ModelHVAC.i),\n",
       " ThermochromicGlazing(ModelResources.i),\n",
       " Thermostat(ModelHVAC.i),\n",
       " ThermostatSetpointDualSetpoint(ModelHVAC.i),\n",
       " Timestep(ModelSimulation.i, Unique),\n",
       " TransitionZone(ModelHVAC.i),\n",
       " UnitarySystemPerformanceMultispeed(ModelHVAC.i),\n",
       " UtilityBill(ModelCore.i),\n",
       " Version(ModelCore.i, Unique),\n",
       " ViewFactor(ModelGeometry.i),\n",
       " ViewFactorData(ModelAirflow.i),\n",
       " WaterHeaterHeatPump(ModelZoneHVAC.i),\n",
       " WaterHeaterHeatPumpWrappedCondenser(ModelZoneHVAC.i),\n",
       " WaterHeaterMixed(ModelHVAC.i),\n",
       " WaterHeaterSizing(ModelHVAC.i),\n",
       " WaterHeaterStratified(ModelHVAC.i),\n",
       " WaterToAirComponent(ModelHVAC.i),\n",
       " WaterToWaterComponent(ModelHVAC.i),\n",
       " WaterUseConnections(ModelStraightComponent.i),\n",
       " WaterUseEquipment(ModelHVAC.i),\n",
       " WaterUseEquipmentDefinition(ModelHVAC.i),\n",
       " WeatherFile(ModelSimulation.i, Unique),\n",
       " WeatherFileConditionType(ModelSimulation.i),\n",
       " WeatherFileDays(ModelSimulation.i),\n",
       " WindowDataFile(ModelResources.i),\n",
       " WindowPropertyFrameAndDivider(ModelResources.i),\n",
       " YearDescription(ModelSimulation.i, Unique),\n",
       " ZoneAirContaminantBalance(ModelSimulation.i, Unique),\n",
       " ZoneAirHeatBalanceAlgorithm(ModelSimulation.i, Unique),\n",
       " ZoneAirMassFlowConservation(ModelSimulation.i, Unique),\n",
       " ZoneCapacitanceMultiplierResearchSpecial(ModelSimulation.i, Unique),\n",
       " ZoneControlContaminantController(ModelHVAC.i),\n",
       " ZoneControlHumidistat(ModelHVAC.i),\n",
       " ZoneControlThermostatStagedDualSetpoint(ModelHVAC.i),\n",
       " ZoneHVACBaseboardConvectiveElectric(ModelZoneHVAC.i),\n",
       " ZoneHVACBaseboardConvectiveWater(ModelZoneHVAC.i),\n",
       " ZoneHVACBaseboardRadiantConvectiveElectric(ModelZoneHVAC.i),\n",
       " ZoneHVACBaseboardRadiantConvectiveWater(ModelZoneHVAC.i),\n",
       " ZoneHVACComponent(ModelHVAC.i),\n",
       " ZoneHVACCoolingPanelRadiantConvectiveWater(ModelZoneHVAC.i),\n",
       " ZoneHVACDehumidifierDX(ModelZoneHVAC.i),\n",
       " ZoneHVACEnergyRecoveryVentilator(ModelZoneHVAC.i),\n",
       " ZoneHVACEnergyRecoveryVentilatorController(ModelZoneHVAC.i),\n",
       " ZoneHVACEquipmentList(ModelHVAC.i),\n",
       " ZoneHVACFourPipeFanCoil(ModelZoneHVAC.i),\n",
       " ZoneHVACHighTemperatureRadiant(ModelZoneHVAC.i),\n",
       " ZoneHVACIdealLoadsAirSystem(ModelZoneHVAC.i),\n",
       " ZoneHVACLowTempRadiantConstFlow(ModelZoneHVAC.i),\n",
       " ZoneHVACLowTempRadiantVarFlow(ModelZoneHVAC.i),\n",
       " ZoneHVACLowTemperatureRadiantElectric(ModelZoneHVAC.i),\n",
       " ZoneHVACPackagedTerminalAirConditioner(ModelZoneHVAC.i),\n",
       " ZoneHVACPackagedTerminalHeatPump(ModelZoneHVAC.i),\n",
       " ZoneHVACTerminalUnitVariableRefrigerantFlow(ModelZoneHVAC.i),\n",
       " ZoneHVACUnitHeater(ModelZoneHVAC.i),\n",
       " ZoneHVACUnitVentilator(ModelZoneHVAC.i),\n",
       " ZoneHVACWaterToAirHeatPump(ModelZoneHVAC.i),\n",
       " ZoneMixing(ModelHVAC.i),\n",
       " ZonePropertyUserViewFactorsBySurfaceName(ModelGeometry.i),\n",
       " ZoneVentilationDesignFlowRate(ModelHVAC.i),\n",
       " ZoneVentilationWindandStackOpenArea(ModelHVAC.i)]"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "swig_entries.sort(key=lambda x: x.name)\n",
    "swig_entries"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7f4b1366",
   "metadata": {},
   "source": [
    "# Generate Partial Classes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "id": "054b084f",
   "metadata": {},
   "outputs": [],
   "source": [
    "swig_file = \"ModelGeometry.i\"\n",
    "swig_file = \"ModelAirflow.i\"\n",
    "swig_file = \"ModelSimulation.i\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "id": "da7de866",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['RunPeriod',\n",
       " 'ClimateZones',\n",
       " 'ConvergenceLimits',\n",
       " 'EnvironmentalImpactFactors',\n",
       " 'FoundationKivaSettings',\n",
       " 'HeatBalanceAlgorithm',\n",
       " 'InsideSurfaceConvectionAlgorithm',\n",
       " 'LightingSimulationControl',\n",
       " 'OutputControlFiles',\n",
       " 'OutputControlReportingTolerances',\n",
       " 'OutputDebuggingData',\n",
       " 'OutputDiagnostics',\n",
       " 'OutputJSON',\n",
       " 'OutputTableSummaryReports',\n",
       " 'OutsideSurfaceConvectionAlgorithm',\n",
       " 'PerformancePrecisionTradeoffs',\n",
       " 'RunPeriodControlDaylightSavingTime',\n",
       " 'ShadowCalculation',\n",
       " 'SimulationControl',\n",
       " 'SiteGroundReflectance',\n",
       " 'SiteGroundTemperatureBuildingSurface',\n",
       " 'SiteGroundTemperatureDeep',\n",
       " 'SiteGroundTemperatureFCfactorMethod',\n",
       " 'SiteGroundTemperatureShallow',\n",
       " 'SiteWaterMainsTemperature',\n",
       " 'SizingParameters',\n",
       " 'Timestep',\n",
       " 'WeatherFile',\n",
       " 'YearDescription',\n",
       " 'ZoneAirContaminantBalance',\n",
       " 'ZoneAirHeatBalanceAlgorithm',\n",
       " 'ZoneAirMassFlowConservation',\n",
       " 'ZoneCapacitanceMultiplierResearchSpecial']"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "found_names = [x.name for x in swig_entries if x.is_unique and x.swig_file == swig_file]\n",
    "if swig_file == \"ModelSimulation.i\":\n",
    "    found_names.insert(0, \"RunPeriod\")\n",
    "found_names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "id": "1606da37",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'OpenStudioModelSimulation'"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "csharp_namespace = \"OpenStudio\" + swig_file.replace(\".i\", \"\")\n",
    "csharp_namespace"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "id": "0f06d570",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "#if defined SWIGCSHARP || defined(SWIGJAVA)\n",
      "\n",
      "  %inline {\n",
      "    namespace openstudio {\n",
      "      namespace model {\n",
      "\n",
      "        boost::optional<RunPeriod> runPeriod(const openstudio::model::Model& model) {\n",
      "          return model.runPeriod();\n",
      "        }\n",
      "\n",
      "        boost::optional<ClimateZones> climateZones(const openstudio::model::Model& model) {\n",
      "          return model.climateZones();\n",
      "        }\n",
      "\n",
      "        boost::optional<ConvergenceLimits> convergenceLimits(const openstudio::model::Model& model) {\n",
      "          return model.convergenceLimits();\n",
      "        }\n",
      "\n",
      "        boost::optional<EnvironmentalImpactFactors> environmentalImpactFactors(const openstudio::model::Model& model) {\n",
      "          return model.environmentalImpactFactors();\n",
      "        }\n",
      "\n",
      "        boost::optional<FoundationKivaSettings> foundationKivaSettings(const openstudio::model::Model& model) {\n",
      "          return model.foundationKivaSettings();\n",
      "        }\n",
      "\n",
      "        boost::optional<HeatBalanceAlgorithm> heatBalanceAlgorithm(const openstudio::model::Model& model) {\n",
      "          return model.heatBalanceAlgorithm();\n",
      "        }\n",
      "\n",
      "        boost::optional<InsideSurfaceConvectionAlgorithm> insideSurfaceConvectionAlgorithm(const openstudio::model::Model& model) {\n",
      "          return model.insideSurfaceConvectionAlgorithm();\n",
      "        }\n",
      "\n",
      "        boost::optional<LightingSimulationControl> lightingSimulationControl(const openstudio::model::Model& model) {\n",
      "          return model.lightingSimulationControl();\n",
      "        }\n",
      "\n",
      "        boost::optional<OutputControlFiles> outputControlFiles(const openstudio::model::Model& model) {\n",
      "          return model.outputControlFiles();\n",
      "        }\n",
      "\n",
      "        boost::optional<OutputControlReportingTolerances> outputControlReportingTolerances(const openstudio::model::Model& model) {\n",
      "          return model.outputControlReportingTolerances();\n",
      "        }\n",
      "\n",
      "        boost::optional<OutputDebuggingData> outputDebuggingData(const openstudio::model::Model& model) {\n",
      "          return model.outputDebuggingData();\n",
      "        }\n",
      "\n",
      "        boost::optional<OutputDiagnostics> outputDiagnostics(const openstudio::model::Model& model) {\n",
      "          return model.outputDiagnostics();\n",
      "        }\n",
      "\n",
      "        boost::optional<OutputJSON> outputJSON(const openstudio::model::Model& model) {\n",
      "          return model.outputJSON();\n",
      "        }\n",
      "\n",
      "        boost::optional<OutputTableSummaryReports> outputTableSummaryReports(const openstudio::model::Model& model) {\n",
      "          return model.outputTableSummaryReports();\n",
      "        }\n",
      "\n",
      "        boost::optional<OutsideSurfaceConvectionAlgorithm> outsideSurfaceConvectionAlgorithm(const openstudio::model::Model& model) {\n",
      "          return model.outsideSurfaceConvectionAlgorithm();\n",
      "        }\n",
      "\n",
      "        boost::optional<PerformancePrecisionTradeoffs> performancePrecisionTradeoffs(const openstudio::model::Model& model) {\n",
      "          return model.performancePrecisionTradeoffs();\n",
      "        }\n",
      "\n",
      "        boost::optional<RunPeriodControlDaylightSavingTime> runPeriodControlDaylightSavingTime(const openstudio::model::Model& model) {\n",
      "          return model.runPeriodControlDaylightSavingTime();\n",
      "        }\n",
      "\n",
      "        boost::optional<ShadowCalculation> shadowCalculation(const openstudio::model::Model& model) {\n",
      "          return model.shadowCalculation();\n",
      "        }\n",
      "\n",
      "        boost::optional<SimulationControl> simulationControl(const openstudio::model::Model& model) {\n",
      "          return model.simulationControl();\n",
      "        }\n",
      "\n",
      "        boost::optional<SiteGroundReflectance> siteGroundReflectance(const openstudio::model::Model& model) {\n",
      "          return model.siteGroundReflectance();\n",
      "        }\n",
      "\n",
      "        boost::optional<SiteGroundTemperatureBuildingSurface> siteGroundTemperatureBuildingSurface(const openstudio::model::Model& model) {\n",
      "          return model.siteGroundTemperatureBuildingSurface();\n",
      "        }\n",
      "\n",
      "        boost::optional<SiteGroundTemperatureDeep> siteGroundTemperatureDeep(const openstudio::model::Model& model) {\n",
      "          return model.siteGroundTemperatureDeep();\n",
      "        }\n",
      "\n",
      "        boost::optional<SiteGroundTemperatureFCfactorMethod> siteGroundTemperatureFCfactorMethod(const openstudio::model::Model& model) {\n",
      "          return model.siteGroundTemperatureFCfactorMethod();\n",
      "        }\n",
      "\n",
      "        boost::optional<SiteGroundTemperatureShallow> siteGroundTemperatureShallow(const openstudio::model::Model& model) {\n",
      "          return model.siteGroundTemperatureShallow();\n",
      "        }\n",
      "\n",
      "        boost::optional<SiteWaterMainsTemperature> siteWaterMainsTemperature(const openstudio::model::Model& model) {\n",
      "          return model.siteWaterMainsTemperature();\n",
      "        }\n",
      "\n",
      "        boost::optional<SizingParameters> sizingParameters(const openstudio::model::Model& model) {\n",
      "          return model.sizingParameters();\n",
      "        }\n",
      "\n",
      "        boost::optional<Timestep> timestep(const openstudio::model::Model& model) {\n",
      "          return model.timestep();\n",
      "        }\n",
      "\n",
      "        boost::optional<WeatherFile> weatherFile(const openstudio::model::Model& model) {\n",
      "          return model.weatherFile();\n",
      "        }\n",
      "\n",
      "        boost::optional<YearDescription> yearDescription(const openstudio::model::Model& model) {\n",
      "          return model.yearDescription();\n",
      "        }\n",
      "\n",
      "        boost::optional<ZoneAirContaminantBalance> zoneAirContaminantBalance(const openstudio::model::Model& model) {\n",
      "          return model.zoneAirContaminantBalance();\n",
      "        }\n",
      "\n",
      "        boost::optional<ZoneAirHeatBalanceAlgorithm> zoneAirHeatBalanceAlgorithm(const openstudio::model::Model& model) {\n",
      "          return model.zoneAirHeatBalanceAlgorithm();\n",
      "        }\n",
      "\n",
      "        boost::optional<ZoneAirMassFlowConservation> zoneAirMassFlowConservation(const openstudio::model::Model& model) {\n",
      "          return model.zoneAirMassFlowConservation();\n",
      "        }\n",
      "\n",
      "        boost::optional<ZoneCapacitanceMultiplierResearchSpecial> zoneCapacitanceMultiplierResearchSpecial(const openstudio::model::Model& model) {\n",
      "          return model.zoneCapacitanceMultiplierResearchSpecial();\n",
      "        }\n",
      "\n",
      "      }\n",
      "    }\n",
      "  } // %inline\n",
      "  \n",
      "#endif // defined SWIGCSHARP\n"
     ]
    }
   ],
   "source": [
    "print(\n",
    "    \"\"\"#if defined SWIGCSHARP || defined(SWIGJAVA)\n",
    "\n",
    "  %inline {\n",
    "    namespace openstudio {\n",
    "      namespace model {\"\"\"\n",
    ")\n",
    "\n",
    "for name in found_names:\n",
    "    getter_name = name[0].lower() + name[1:]\n",
    "    print(\n",
    "        f\"\"\"\n",
    "        boost::optional<{name}> {getter_name}(const openstudio::model::Model& model) {{\n",
    "          return model.{getter_name}();\n",
    "        }}\"\"\"\n",
    "    )\n",
    "\n",
    "print(\n",
    "    \"\"\"\n",
    "      }\n",
    "    }\n",
    "  } // %inline\n",
    "  \n",
    "#endif // defined SWIGCSHARP\"\"\"\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "08d5e50e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "#if defined(SWIGCSHARP)\n",
      "  //%pragma(csharp) imclassimports=%{\n",
      "  %pragma(csharp) moduleimports=%{\n",
      "\n",
      "    using System;\n",
      "    using System.Runtime.InteropServices;\n",
      "\n",
      "    public partial class Model : Workspace {\n",
      "\n",
      "      public OptionalClimateZones climateZones() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.climateZones(this);\n",
      "      }\n",
      "\n",
      "      public OptionalConvergenceLimits convergenceLimits() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.convergenceLimits(this);\n",
      "      }\n",
      "\n",
      "      public OptionalEnvironmentalImpactFactors environmentalImpactFactors() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.environmentalImpactFactors(this);\n",
      "      }\n",
      "\n",
      "      public OptionalFoundationKivaSettings foundationKivaSettings() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.foundationKivaSettings(this);\n",
      "      }\n",
      "\n",
      "      public OptionalHeatBalanceAlgorithm heatBalanceAlgorithm() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.heatBalanceAlgorithm(this);\n",
      "      }\n",
      "\n",
      "      public OptionalInsideSurfaceConvectionAlgorithm insideSurfaceConvectionAlgorithm() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.insideSurfaceConvectionAlgorithm(this);\n",
      "      }\n",
      "\n",
      "      public OptionalLightingSimulationControl lightingSimulationControl() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.lightingSimulationControl(this);\n",
      "      }\n",
      "\n",
      "      public OptionalOutputControlFiles outputControlFiles() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.outputControlFiles(this);\n",
      "      }\n",
      "\n",
      "      public OptionalOutputControlReportingTolerances outputControlReportingTolerances() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.outputControlReportingTolerances(this);\n",
      "      }\n",
      "\n",
      "      public OptionalOutputDebuggingData outputDebuggingData() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.outputDebuggingData(this);\n",
      "      }\n",
      "\n",
      "      public OptionalOutputDiagnostics outputDiagnostics() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.outputDiagnostics(this);\n",
      "      }\n",
      "\n",
      "      public OptionalOutputJSON outputJSON() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.outputJSON(this);\n",
      "      }\n",
      "\n",
      "      public OptionalOutputTableSummaryReports outputTableSummaryReports() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.outputTableSummaryReports(this);\n",
      "      }\n",
      "\n",
      "      public OptionalOutsideSurfaceConvectionAlgorithm outsideSurfaceConvectionAlgorithm() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.outsideSurfaceConvectionAlgorithm(this);\n",
      "      }\n",
      "\n",
      "      public OptionalPerformancePrecisionTradeoffs performancePrecisionTradeoffs() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.performancePrecisionTradeoffs(this);\n",
      "      }\n",
      "\n",
      "      public OptionalRunPeriodControlDaylightSavingTime runPeriodControlDaylightSavingTime() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.runPeriodControlDaylightSavingTime(this);\n",
      "      }\n",
      "\n",
      "      public OptionalShadowCalculation shadowCalculation() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.shadowCalculation(this);\n",
      "      }\n",
      "\n",
      "      public OptionalSimulationControl simulationControl() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.simulationControl(this);\n",
      "      }\n",
      "\n",
      "      public OptionalSiteGroundReflectance siteGroundReflectance() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.siteGroundReflectance(this);\n",
      "      }\n",
      "\n",
      "      public OptionalSiteGroundTemperatureBuildingSurface siteGroundTemperatureBuildingSurface() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.siteGroundTemperatureBuildingSurface(this);\n",
      "      }\n",
      "\n",
      "      public OptionalSiteGroundTemperatureDeep siteGroundTemperatureDeep() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.siteGroundTemperatureDeep(this);\n",
      "      }\n",
      "\n",
      "      public OptionalSiteGroundTemperatureFCfactorMethod siteGroundTemperatureFCfactorMethod() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.siteGroundTemperatureFCfactorMethod(this);\n",
      "      }\n",
      "\n",
      "      public OptionalSiteGroundTemperatureShallow siteGroundTemperatureShallow() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.siteGroundTemperatureShallow(this);\n",
      "      }\n",
      "\n",
      "      public OptionalSiteWaterMainsTemperature siteWaterMainsTemperature() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.siteWaterMainsTemperature(this);\n",
      "      }\n",
      "\n",
      "      public OptionalSizingParameters sizingParameters() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.sizingParameters(this);\n",
      "      }\n",
      "\n",
      "      public OptionalTimestep timestep() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.timestep(this);\n",
      "      }\n",
      "\n",
      "      public OptionalWeatherFile weatherFile() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.weatherFile(this);\n",
      "      }\n",
      "\n",
      "      public OptionalYearDescription yearDescription() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.yearDescription(this);\n",
      "      }\n",
      "\n",
      "      public OptionalZoneAirContaminantBalance zoneAirContaminantBalance() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.zoneAirContaminantBalance(this);\n",
      "      }\n",
      "\n",
      "      public OptionalZoneAirHeatBalanceAlgorithm zoneAirHeatBalanceAlgorithm() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.zoneAirHeatBalanceAlgorithm(this);\n",
      "      }\n",
      "\n",
      "      public OptionalZoneAirMassFlowConservation zoneAirMassFlowConservation() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.zoneAirMassFlowConservation(this);\n",
      "      }\n",
      "\n",
      "      public OptionalZoneCapacitanceMultiplierResearchSpecial zoneCapacitanceMultiplierResearchSpecial() {\n",
      "        return OpenStudio.OpenStudioModelSimulation.zoneCapacitanceMultiplierResearchSpecial(this);\n",
      "      }\n",
      "\n",
      "    } // partial class Model\n",
      "  %} // pragma\n",
      "#endif // defined(SWIGCSHARP)\n"
     ]
    }
   ],
   "source": [
    "print(\n",
    "    \"\"\"\n",
    "#if defined(SWIGCSHARP)\n",
    "  //%pragma(csharp) imclassimports=%{\n",
    "  %pragma(csharp) moduleimports=%{\n",
    "\n",
    "    using System;\n",
    "    using System.Runtime.InteropServices;\n",
    "\n",
    "    public partial class Model : Workspace {\"\"\"\n",
    ")\n",
    "\n",
    "for name in found_names:\n",
    "    getter_name = name[0].lower() + name[1:]\n",
    "    print(\n",
    "        f\"\"\"\n",
    "      public Optional{name} {getter_name}() {{\n",
    "        return OpenStudio.{csharp_namespace}.{getter_name}(this);\n",
    "      }}\"\"\"\n",
    "    )\n",
    "\n",
    "print(\n",
    "    \"\"\"\n",
    "    } // partial class Model\n",
    "  %} // pragma\n",
    "#endif // defined(SWIGCSHARP)\"\"\"\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "id": "207d399c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "// ignore objects for now, add back in with partial classes in ModelSimulation.i\n",
      "  %ignore openstudio::model::Model::runPeriod;\n",
      "  %ignore openstudio::model::Model::climateZones;\n",
      "  %ignore openstudio::model::Model::convergenceLimits;\n",
      "  %ignore openstudio::model::Model::environmentalImpactFactors;\n",
      "  %ignore openstudio::model::Model::foundationKivaSettings;\n",
      "  %ignore openstudio::model::Model::heatBalanceAlgorithm;\n",
      "  %ignore openstudio::model::Model::insideSurfaceConvectionAlgorithm;\n",
      "  %ignore openstudio::model::Model::lightingSimulationControl;\n",
      "  %ignore openstudio::model::Model::outputControlFiles;\n",
      "  %ignore openstudio::model::Model::outputControlReportingTolerances;\n",
      "  %ignore openstudio::model::Model::outputDebuggingData;\n",
      "  %ignore openstudio::model::Model::outputDiagnostics;\n",
      "  %ignore openstudio::model::Model::outputJSON;\n",
      "  %ignore openstudio::model::Model::outputTableSummaryReports;\n",
      "  %ignore openstudio::model::Model::outsideSurfaceConvectionAlgorithm;\n",
      "  %ignore openstudio::model::Model::performancePrecisionTradeoffs;\n",
      "  %ignore openstudio::model::Model::runPeriodControlDaylightSavingTime;\n",
      "  %ignore openstudio::model::Model::shadowCalculation;\n",
      "  %ignore openstudio::model::Model::simulationControl;\n",
      "  %ignore openstudio::model::Model::siteGroundReflectance;\n",
      "  %ignore openstudio::model::Model::siteGroundTemperatureBuildingSurface;\n",
      "  %ignore openstudio::model::Model::siteGroundTemperatureDeep;\n",
      "  %ignore openstudio::model::Model::siteGroundTemperatureFCfactorMethod;\n",
      "  %ignore openstudio::model::Model::siteGroundTemperatureShallow;\n",
      "  %ignore openstudio::model::Model::siteWaterMainsTemperature;\n",
      "  %ignore openstudio::model::Model::sizingParameters;\n",
      "  %ignore openstudio::model::Model::timestep;\n",
      "  %ignore openstudio::model::Model::weatherFile;\n",
      "  %ignore openstudio::model::Model::yearDescription;\n",
      "  %ignore openstudio::model::Model::zoneAirContaminantBalance;\n",
      "  %ignore openstudio::model::Model::zoneAirHeatBalanceAlgorithm;\n",
      "  %ignore openstudio::model::Model::zoneAirMassFlowConservation;\n",
      "  %ignore openstudio::model::Model::zoneCapacitanceMultiplierResearchSpecial;\n"
     ]
    }
   ],
   "source": [
    "print(f\"// ignore objects for now, add back in with partial classes in {swig_file}\")\n",
    "for name in found_names:\n",
    "    getter_name = name[0].lower() + name[1:]\n",
    "    print(f\"  %ignore openstudio::model::Model::{getter_name};\")"
   ]
  },
  {
   "cell_type": "raw",
   "id": "f3c65842",
   "metadata": {},
   "source": [
    "with open(MODEL_DIR / 'ModelCore.i', 'r') as f:\n",
    "    content = f.read()\n",
    "lines = content.splitlines()\n",
    "for line in lines:\n",
    "    if \"%ignore openstudio::model::Model::\" in line:\n",
    "        print(line)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
